package com.rainsoftware.LicenseSystem.models.entity;

import com.rainsoftware.LicenseSystem.models.entity.base.BaseEntity;
import gaarason.database.annotation.Column;
import gaarason.database.annotation.Table;
import gaarason.database.contract.eloquent.Record;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Repository;

import java.security.KeyPairGenerator;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.util.Base64;


@Data
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "keypairs")
public class KeyPair extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** auto generator start **/


    @Column(name = "developer_id", nullable = true)
    private Integer developerId;

    @Column(name = "pub_key", length = 65535L)
    private String pubKey;

    @Column(name = "priv_key", length = 65535L)
    private String privKey;


    /** auto generator end **/

    @Repository
    public static class Model extends BaseEntity.BaseModel<KeyPair, Integer> {

    }
}